this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-category"]=function(e){function t(t){for(var r,a,i=t[0],l=t[1],s=t[2],d=0,b=[];d<i.length;d++)a=i[d],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&b.push(c[a][0]),c[a]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(u&&u(t);b.length;)b.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,i=1;i<n.length;i++){var l=n[i];0!==c[l]&&(r=!1)}r&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var r={},c={14:0,1:0,2:0,3:0},o=[];function a(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return o.push([496,0]),n()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wp.htmlEntities},100:function(e,t,n){"use strict";function r(e){return e?`${Math.round(100*e.x)}% ${Math.round(100*e.y)}%`:""}function c({focalPoint:e,imageFit:t,isImgElement:n,isRepeated:c,url:o}){let a={};var i;return a=n?{...a,...(i=e,i?{objectPosition:r(i)}:{}),objectFit:t}:{...a,...o&&{backgroundImage:`url(${o})`},backgroundPosition:r(e),...!c&&{backgroundRepeat:"no-repeat",backgroundSize:"cover"===t?t:"auto"}},a}function o(e){return`wc-block-${e.split("/")[1]}`}function a(e){return 0===e||50===e?null:"has-background-dim-"+10*Math.round(e/10)}n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}))},102:function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n(0),c=n(1),o=n(2),a=n(70),i=n(614),l=n(4),s=n.n(l),u=n(11),d=n(16),b=n(35),m=n(613),g=n(10);n(55);const p=({id:e,label:t,popoverContents:n,remove:i,screenReaderLabel:l,className:d=""})=>{const[b,h]=Object(r.useState)(!1),O=Object(u.useInstanceId)(p);if(l=l||t,!t)return null;t=Object(g.decodeEntities)(t);const j=s()("woocommerce-tag",d,{"has-remove":!!i}),f=`woocommerce-tag__label-${O}`,v=Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},l),Object(r.createElement)("span",{"aria-hidden":"true"},t));return Object(r.createElement)("span",{className:j},n?Object(r.createElement)(o.Button,{className:"woocommerce-tag__text",id:f,onClick:()=>h(!0)},v):Object(r.createElement)("span",{className:"woocommerce-tag__text",id:f},v),n&&b&&Object(r.createElement)(o.Popover,{onClose:()=>h(!1)},n),i&&Object(r.createElement)(o.Button,{className:"woocommerce-tag__remove",onClick:i(e),label:Object(c.sprintf)(
// Translators: %s label.
Object(c.__)("Remove %s","woocommerce"),t),"aria-describedby":f},Object(r.createElement)(a.a,{icon:m.a,size:20,className:"clear-icon"})))};var h=p;n(54);const O=e=>Object(r.createElement)(b.b,{...e}),j=e=>{const{list:t,selected:n,renderItem:c,depth:o=0,onSelect:a,instanceId:i,isSingle:l,search:s,useExpandedPanelId:u}=e,[d]=u;return t?Object(r.createElement)(r.Fragment,null,t.map((t=>{var b,m;const g=null!==(b=t.children)&&void 0!==b&&b.length&&!l?t.children.every((({id:e})=>n.find((t=>t.id===e)))):!!n.find((({id:e})=>e===t.id)),p=(null===(m=t.children)||void 0===m?void 0:m.length)&&d===t.id;return Object(r.createElement)(r.Fragment,{key:t.id},Object(r.createElement)("li",null,c({item:t,isSelected:g,onSelect:a,isSingle:l,selected:n,search:s,depth:o,useExpandedPanelId:u,controlId:i})),p?Object(r.createElement)(j,{...e,list:t.children,depth:o+1}):null)}))):null},f=({isLoading:e,isSingle:t,selected:n,messages:a,onChange:i,onRemove:l})=>{if(e||t||!n)return null;const s=n.length;return Object(r.createElement)("div",{className:"woocommerce-search-list__selected"},Object(r.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(r.createElement)("strong",null,a.selected(s)),s>0?Object(r.createElement)(o.Button,{isLink:!0,isDestructive:!0,onClick:()=>i([]),"aria-label":a.clear},Object(c.__)("Clear all","woocommerce")):null),s>0?Object(r.createElement)("ul",null,n.map(((e,t)=>Object(r.createElement)("li",{key:t},Object(r.createElement)(h,{label:e.name,id:e.id,remove:l}))))):null)},v=({filteredList:e,search:t,onSelect:n,instanceId:o,useExpandedPanelId:l,...s})=>{const{messages:u,renderItem:d,selected:b,isSingle:m}=s,g=d||O;return 0===e.length?Object(r.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(r.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(r.createElement)(a.a,{icon:i.a})),Object(r.createElement)("span",{className:"woocommerce-search-list__not-found-text"},t?Object(c.sprintf)(u.noResults,t):u.noItems)):Object(r.createElement)("ul",{className:"woocommerce-search-list__list"},Object(r.createElement)(j,{useExpandedPanelId:l,list:e,selected:b,renderItem:g,onSelect:n,instanceId:o,isSingle:m,search:t}))},w=e=>{const{className:t="",isCompact:n,isHierarchical:a,isLoading:i,isSingle:l,list:b,messages:m=d.a,onChange:g,onSearch:p,selected:h,type:O="text",debouncedSpeak:j}=e,[_,y]=Object(r.useState)(""),E=Object(r.useState)(-1),k=Object(u.useInstanceId)(w),S=Object(r.useMemo)((()=>({...d.a,...m})),[m]),I=Object(r.useMemo)((()=>Object(d.c)(b,_,a)),[b,_,a]);Object(r.useEffect)((()=>{j&&j(S.updated)}),[j,S]),Object(r.useEffect)((()=>{"function"==typeof p&&p(_)}),[_,p]);const C=Object(r.useCallback)((e=>()=>{l&&g([]);const t=h.findIndex((({id:t})=>t===e));g([...h.slice(0,t),...h.slice(t+1)])}),[l,h,g]),x=Object(r.useCallback)((e=>()=>{Array.isArray(e)?g(e):-1===h.findIndex((({id:t})=>t===e.id))?g(l?[e]:[...h,e]):C(e.id)()}),[l,C,g,h]),P=Object(r.useCallback)((e=>{const[t]=h.filter((t=>!e.find((e=>t.id===e.id))));C(t.id)()}),[C,h]);return Object(r.createElement)("div",{className:s()("woocommerce-search-list",t,{"is-compact":n,"is-loading":i,"is-token":"token"===O})},"text"===O&&Object(r.createElement)(f,{...e,onRemove:C,messages:S}),Object(r.createElement)("div",{className:"woocommerce-search-list__search"},"text"===O?Object(r.createElement)(o.TextControl,{label:S.search,type:"search",value:_,onChange:e=>y(e)}):Object(r.createElement)(o.FormTokenField,{disabled:i,label:S.search,onChange:P,onInputChange:e=>y(e),suggestions:[],__experimentalValidateInput:()=>!1,value:i?[Object(c.__)("Loading…","woocommerce")]:h.map((e=>({...e,value:e.name}))),__experimentalShowHowTo:!1})),i?Object(r.createElement)("div",{className:"woocommerce-search-list__list"},Object(r.createElement)(o.Spinner,null)):Object(r.createElement)(v,{...e,search:_,filteredList:I,messages:S,onSelect:x,instanceId:k,useExpandedPanelId:E}))};Object(o.withSpokenMessages)(w)},106:function(e,t){},11:function(e,t){e.exports=window.wp.compose},110:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(260),a=n(35),i=n(102),l=n(11),s=n(218),u=n(18),d=n.n(u),b=n(25),m=n.n(b),g=n(23),p=n(28),h=Object(l.createHigherOrderComponent)((e=>{class t extends r.Component{constructor(...e){super(...e),d()(this,"state",{error:null,loading:!1,variations:{}}),d()(this,"loadVariations",(()=>{const{products:e}=this.props,{loading:t,variations:n}=this.state;if(t)return;const r=this.getExpandedProduct();if(!r||n[r])return;const c=e.find((e=>e.id===r));c.variations&&0!==c.variations.length?(this.setState({loading:!0}),Object(g.g)(r).then((e=>{const t=e.map((e=>({...e,parent:r})));this.setState({variations:{...this.state.variations,[r]:t},loading:!1,error:null})})).catch((async e=>{const t=await Object(p.a)(e);this.setState({variations:{...this.state.variations,[r]:null},loading:!1,error:t})}))):this.setState({variations:{...this.state.variations,[r]:null},loading:!1,error:null})}))}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:n,showVariations:r}=this.props;r&&(!m()(e.selected,n)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some((t=>t.id===e))}findParentProduct(e){var t;const{products:n}=this.props;return null===(t=n.filter((t=>t.variations&&t.variations.find((({id:t})=>t===e))))[0])||void 0===t?void 0:t.id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:n}=this.props;if(!n)return null;let r=t&&t.length?t[0]:null;return r?this.prevSelectedItem=r:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(r=this.prevSelectedItem)),!e&&r?this.isProductId(r)?r:this.findParentProduct(r):null}render(){const{error:t,isLoading:n}=this.props,{error:c,loading:o,variations:a}=this.state;return Object(r.createElement)(e,{...this.props,error:c||t,expandedProduct:this.getExpandedProduct(),isLoading:n,variations:a,variationsLoading:o})}}return d()(t,"defaultProps",{selected:[],showVariations:!1}),t}),"withProductVariations"),O=n(34),j=n(4),f=n.n(j),v=n(73);n(155);const w={list:Object(c.__)("Products","woocommerce"),noItems:Object(c.__)("Your store doesn't have any products.","woocommerce"),search:Object(c.__)("Search for a product to display","woocommerce"),updated:Object(c.__)("Product search results updated.","woocommerce")},_=({expandedProduct:e,error:t,instanceId:n,isCompact:l,isLoading:s,onChange:u,onSearch:d,products:b,renderItem:m,selected:g,showVariations:p,variations:h,variationsLoading:j})=>{if(t)return Object(r.createElement)(O.a,{error:t});const _=[...b,...h&&h[e]?h[e]:[]];return Object(r.createElement)(i.a,{className:"woocommerce-products",list:_,isCompact:l,isLoading:s,isSingle:!0,selected:_.filter((({id:e})=>g.includes(e))),onChange:u,renderItem:m||(p?e=>{const{item:t,search:i,depth:l=0,isSelected:u,onSelect:d}=e,b=t.variations&&Array.isArray(t.variations)?t.variations.length:0,m=f()("woocommerce-search-product__item","woocommerce-search-list__item",`depth-${l}`,"has-count",{"is-searching":i.length>0,"is-skip-level":0===l&&0!==t.parent,"is-variable":b>0});if(!t.breadcrumbs.length)return Object(r.createElement)(v.a,{...e,className:f()(m,{"is-selected":u}),isSelected:u,item:t,onSelect:()=>()=>{d(t)()},isLoading:s||j,countLabel:t.variations.length>0?Object(c.sprintf)(/* translators: %1$d is the number of variations of a product product. */
Object(c.__)("%1$d variations","woocommerce"),t.variations.length):null,name:`products-${n}`,"aria-label":Object(c.sprintf)(/* translators: %1$s is the product name, %2$d is the number of variations of that product. */
Object(c._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woocommerce"),t.name,t.variations.length)});const g=Object(o.a)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(r.createElement)(a.a,{...g,className:m,name:`variations-${n}`})}:null),onSearch:d,messages:w,isHierarchical:!0})};var y;_.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=(y=Object(s.a)(h(Object(l.withInstanceId)(_))),e=>{let{selected:t}=e;t=void 0===t?null:t;const n=null===t;return Array.isArray(t)?Object(r.createElement)(y,{...e}):Object(r.createElement)(y,{...e,selected:n?[]:[t]})})},113:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>"string"==typeof e},127:function(e,t){e.exports=window.wp.styleEngine},131:function(e,t){},14:function(e,t){e.exports=window.wp.apiFetch},15:function(e,t){e.exports=window.wp.url},155:function(e,t){},16:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(0),c=n(1),o=n(57);const a={clear:Object(c.__)("Clear all selected items","woocommerce"),noItems:Object(c.__)("No items found.","woocommerce"),
/* Translators: %s search term */
noResults:Object(c.__)("No results for %s","woocommerce"),search:Object(c.__)("Search for items","woocommerce"),selected:e=>Object(c.sprintf)(/* translators: Number of items selected from list. */
Object(c._n)("%d item selected","%d items selected",e,"woocommerce"),e),updated:Object(c.__)("Search results updated.","woocommerce")},i=(e,t=e)=>{const n=e.reduce(((e,t)=>{const n=t.parent||0;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),r=Object(o.a)(t,"id"),c=["0"],a=(e={})=>e.parent?[...a(r[e.parent]),e.name]:e.name?[e.name]:[],i=e=>e.map((e=>{const t=n[e.id];return c.push(""+e.id),{...e,breadcrumbs:a(r[e.parent]),children:t&&t.length?i(t):[]}})),l=i(n[0]||[]);return Object.entries(n).forEach((([e,t])=>{c.includes(e)||l.push(...i(t||[]))})),l},l=(e,t,n)=>{if(!t)return n?i(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),c=e.map((e=>!!r.test(e.name)&&e)).filter(Boolean);return n?i(c,e):c},s=(e,t)=>{if(!t)return e;const n=new RegExp(`(${t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")})`,"ig");return e.split(n).map(((e,t)=>n.test(e)?Object(r.createElement)("strong",{key:t},e):Object(r.createElement)(r.Fragment,{key:t},e)))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},17:function(e,t,n){"use strict";n.d(t,"p",(function(){return o})),n.d(t,"n",(function(){return a})),n.d(t,"m",(function(){return i})),n.d(t,"o",(function(){return l})),n.d(t,"k",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"h",(function(){return d})),n.d(t,"l",(function(){return b})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"g",(function(){return p})),n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return f})),n.d(t,"i",(function(){return v})),n.d(t,"j",(function(){return w})),n.d(t,"f",(function(){return _}));var r,c=n(3);const o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=o.pluginUrl+"images/",i=o.pluginUrl+"build/",l=o.buildPhase,s=null===(r=c.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=c.STORE_PAGES.checkout.id,d=(c.STORE_PAGES.checkout.permalink,c.STORE_PAGES.privacy.permalink),b=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),m=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),g=c.STORE_PAGES.cart.permalink,p=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("localPickupEnabled",!1)),h=Object(c.getSetting)("countries",{}),O=Object(c.getSetting)("countryData",{}),j=Object.fromEntries(Object.keys(O).filter((e=>!0===O[e].allowBilling)).map((e=>[e,h[e]||""]))),f=Object.fromEntries(Object.keys(O).filter((e=>!0===O[e].allowBilling)).map((e=>[e,O[e].states||[]]))),v=Object.fromEntries(Object.keys(O).filter((e=>!0===O[e].allowShipping)).map((e=>[e,h[e]||""]))),w=Object.fromEntries(Object.keys(O).filter((e=>!0===O[e].allowShipping)).map((e=>[e,O[e].states||[]]))),_=Object.fromEntries(Object.keys(O).map((e=>[e,O[e].locale||[]])))},2:function(e,t){e.exports=window.wp.components},21:function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(42);const c=e=>!Object(r.a)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return c(e)&&t in e}const a=e=>0===Object.keys(e).length},218:function(e,t,n){"use strict";var r=n(0),c=n(17),o=n(23),a=n(41),i=n(28);t.a=e=>({selected:t,...n})=>{const[l,s]=Object(r.useState)(!0),[u,d]=Object(r.useState)(null),[b,m]=Object(r.useState)([]),g=c.p.productCount>100,p=async e=>{const t=await Object(i.a)(e);d(t),s(!1)},h=Object(r.useRef)(t);Object(r.useEffect)((()=>{Object(o.h)({selected:h.current}).then((e=>{m(e),s(!1)})).catch(p)}),[h]);const O=Object(a.b)((e=>{Object(o.h)({selected:t,search:e}).then((e=>{m(e),s(!1)})).catch(p)}),400),j=Object(r.useCallback)((e=>{s(!0),O(e)}),[s,O]);return Object(r.createElement)(e,{...n,selected:t,error:u,products:b,isLoading:l,onSearch:g?j:null})}},23:function(e,t,n){"use strict";n.d(t,"h",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"i",(function(){return b})),n.d(t,"f",(function(){return m})),n.d(t,"c",(function(){return g})),n.d(t,"d",(function(){return p})),n.d(t,"g",(function(){return h})),n.d(t,"a",(function(){return O}));var r=n(15),c=n(14),o=n.n(c),a=n(3),i=n(17);const l=(e,t)=>{const n=new Map;return e.filter((e=>{const r=t(e);return!n.has(r)&&(n.set(r,e),!0)}))},s=({selected:e=[],search:t="",queryArgs:n={}})=>{const c=(({selected:e=[],search:t="",queryArgs:n={}})=>{const c=i.p.productCount>100,o={per_page:c?100:0,catalog_visibility:"any",search:t,orderby:"title",order:"asc"},a=[Object(r.addQueryArgs)("/wc/store/v1/products",{...o,...n})];return c&&e.length&&a.push(Object(r.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:e,per_page:0})),a})({selected:e,search:t,queryArgs:n});return Promise.all(c.map((e=>o()({path:e})))).then((e=>{const t=e.flat();return l(t,(e=>e.id)).map((e=>({...e,parent:0})))})).catch((e=>{throw e}))},u=e=>o()({path:`/wc/store/v1/products/${e}`}),d=()=>o()({path:"wc/store/v1/products/attributes"}),b=e=>o()({path:`wc/store/v1/products/attributes/${e}/terms`}),m=({selected:e=[],search:t})=>{const n=(({selected:e=[],search:t})=>{const n=Object(a.getSetting)("limitTags",!1),c=[Object(r.addQueryArgs)("wc/store/v1/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:t})];return n&&e.length&&c.push(Object(r.addQueryArgs)("wc/store/v1/products/tags",{include:e})),c})({selected:e,search:t});return Promise.all(n.map((e=>o()({path:e})))).then((e=>{const t=e.flat();return l(t,(e=>e.id))}))},g=e=>o()({path:Object(r.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})}),p=e=>o()({path:`wc/store/v1/products/categories/${e}`}),h=e=>o()({path:Object(r.addQueryArgs)("wc/store/v1/products",{per_page:0,type:"variation",parent:e})}),O=(e,t)=>{if(!e.title.raw)return e.slug;const n=1===t.filter((t=>t.title.raw===e.title.raw)).length;return e.title.raw+(n?"":` - ${e.slug}`)}},244:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(6);const o=e=>t=>{var n;const[o,a]=Object(r.useState)(!1),{attributes:i,category:l,clientId:s,product:u}=t,d=l||u,{editMode:b}=i,m=(null==d?void 0:d.link)||(null==d?void 0:d.permalink),g=Object(c.useSelect)((e=>e("core/block-editor").getBlock(s))),p=null==g||null===(n=g.innerBlocks[0])||void 0===n?void 0:n.innerBlocks[0],h=(null==p?void 0:p.clientId)||"",O=Object(r.useMemo)((()=>(null==p?void 0:p.attributes)||{}),[p]),{url:j}=O,{updateBlockAttributes:f}=Object(c.useDispatch)("core/block-editor");return Object(r.useEffect)((()=>{o&&h&&!b&&m&&j&&m!==j&&(f(h,{url:m}),a(!1))}),[h,o,b,m,f,j]),Object(r.createElement)(e,{...t,triggerUrlUpdate:()=>a(!0)})}},245:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0);const c=e=>t=>{const[n,c]=Object(r.useState)(!1),{isSelected:o}=t;return Object(r.useEffect)((()=>{c(!1)}),[o]),Object(r.createElement)(e,{...t,useEditingImage:[n,c]})}},246:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),c=n(2),o=n(1),a=n(65),i=n(110),l=n(49),s=n(100);const u=({description:e,editLabel:t,icon:n,label:u})=>d=>b=>{const{attributes:m,debouncedSpeak:g,name:p,setAttributes:h,triggerUrlUpdate:O=(()=>{})}=b,j=Object(s.c)(p);return m.editMode?Object(r.createElement)(c.Placeholder,{icon:Object(r.createElement)(c.Icon,{icon:n}),label:u,className:j},e,Object(r.createElement)("div",{className:`${j}__selection`},p===l.a.featuredCategory&&Object(r.createElement)(a.a,{selected:[m.categoryId],onChange:(e=[])=>{const t=e[0]?e[0].id:0;h({categoryId:t,mediaId:0,mediaSrc:""}),O()},isSingle:!0}),p===l.a.featuredProduct&&Object(r.createElement)(i.a,{selected:m.productId?[m.productId]:[],showVariations:!0,onChange:(e=[])=>{const t=e[0]?e[0].id:0;h({productId:t,mediaId:0,mediaSrc:""}),O()}}),Object(r.createElement)(c.Button,{isPrimary:!0,onClick:()=>{h({editMode:!1}),g(t)}},Object(o.__)("Done","woocommerce")))):Object(r.createElement)(d,{...b})}},247:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=n(88),o=n(49),a=n(100);const i=e=>t=>{const{error:n,isLoading:i,name:l}=t,s=Object(a.c)(l),u=l===o.a.featuredCategory?t.getCategory:t.getProduct;return n?Object(r.createElement)(c.a,{className:`${s}-error`,error:n,isLoading:i,onRetry:u}):Object(r.createElement)(e,{...t})}},248:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),c=n(5),o=n(49),a=n(99);const i=({align:e,backgroundImageId:t,backgroundImageSize:n,backgroundImageSrc:a,containerRef:i,isEditingImage:l,setAttributes:s,setIsEditingImage:u})=>{const d=function(e,t){const[n,c]=Object(r.useState)(),o=Object(r.useCallback)((()=>{var t;c(null===(t=e.current)||void 0===t?void 0:t.clientWidth)}),[e]);return Object(r.useEffect)(o,[o,...t]),Object(r.useEffect)((()=>{if(!e.current)return;const{defaultView:t}=e.current.ownerDocument;return t?(t.addEventListener("resize",o),()=>{t.removeEventListener("resize",o)}):void 0}),[e,o]),n}(i,[e]);return"function"==typeof c.__experimentalImageEditingProvider?Object(r.createElement)(c.__experimentalImageEditingProvider,{id:t,url:a,naturalHeight:n.height||o.b.height,naturalWidth:n.width||o.b.width,onSaveImage:({id:e,url:t})=>{s({mediaId:e,mediaSrc:t})},isEditing:l,onFinishEditing:()=>u(!1)},Object(r.createElement)(c.__experimentalImageEditor,{url:a,height:n.height||o.b.height,width:n.width||o.b.width})):Object(r.createElement)(c.__experimentalImageEditor,{id:t,url:a,height:n.height||o.b.height,width:n.width||o.b.width,naturalHeight:n.height,naturalWidth:n.width,onSaveImage:({id:e,url:t})=>{s({mediaId:e,mediaSrc:t})},onFinishEditing:()=>u(!1),clientWidth:d})},l=e=>t=>{const[n,c]=t.useEditingImage,l=Object(r.useRef)(null),{attributes:s,backgroundImageSize:u,name:d,setAttributes:b}=t,{mediaId:m,mediaSrc:g}=s,p=d===o.a.featuredProduct?t.product:t.category,{backgroundImageId:h,backgroundImageSrc:O}=Object(a.a)({item:p,mediaId:m,mediaSrc:g,blockName:d});return n?Object(r.createElement)("div",{ref:l},Object(r.createElement)(i,{align:s.align,backgroundImageId:h,backgroundImageSize:u,backgroundImageSrc:O,containerRef:l,isEditingImage:n,setAttributes:b,setIsEditingImage:c})):Object(r.createElement)(e,{...t})}},249:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),c=n(1),o=n(5),a=n(2),i=n(99),l=n(49);const s=({alt:e,backgroundImageSrc:t,contentPanel:n,dimRatio:i,focalPoint:l,hasParallax:s,imageFit:u,isRepeated:d,overlayColor:b,overlayGradient:m,setAttributes:g,setGradient:p,showDesc:h})=>{const O="function"==typeof a.FocalPointPicker,j=!d&&!s;return Object(r.createElement)(o.InspectorControls,{key:"inspector"},Object(r.createElement)(a.PanelBody,{title:Object(c.__)("Content","woocommerce")},Object(r.createElement)(a.ToggleControl,{label:Object(c.__)("Show description","woocommerce"),checked:h,onChange:()=>g({showDesc:!h})}),n),!!t&&Object(r.createElement)(r.Fragment,null,O&&Object(r.createElement)(a.PanelBody,{title:Object(c.__)("Media settings","woocommerce")},Object(r.createElement)(a.ToggleControl,{label:Object(c.__)("Fixed background","woocommerce"),checked:s,onChange:()=>{g({hasParallax:!s})}}),Object(r.createElement)(a.ToggleControl,{label:Object(c.__)("Repeated background","woocommerce"),checked:d,onChange:()=>{g({isRepeated:!d})}}),!d&&Object(r.createElement)(a.__experimentalToggleGroupControl,{help:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{style:{display:"block",marginBottom:"1em"}},Object(c.__)("Select “Cover” to have the image automatically fit its container.","woocommerce")),Object(r.createElement)("span",null,Object(c.__)("This may affect your ability to freely move the focal point of the image.","woocommerce"))),label:Object(c.__)("Image fit","woocommerce"),value:u,onChange:e=>g({imageFit:e})},Object(r.createElement)(a.__experimentalToggleGroupControlOption,{label:Object(c.__)("None","woocommerce"),value:"none"}),Object(r.createElement)(a.__experimentalToggleGroupControlOption
/* translators: "Cover" is a verb that indicates an image covering the entire container. */,{label:Object(c.__)("Cover","woocommerce"),value:"cover"})),Object(r.createElement)(a.FocalPointPicker,{label:Object(c.__)("Focal Point Picker","woocommerce"),url:t,value:l,onChange:e=>g({focalPoint:e})}),j&&Object(r.createElement)(a.TextareaControl,{label:Object(c.__)("Alt text (alternative text)","woocommerce"),value:e,onChange:e=>{g({alt:e})},help:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},Object(c.__)("Describe the purpose of the image","woocommerce")))})),Object(r.createElement)(o.__experimentalPanelColorGradientSettings,{__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,title:Object(c.__)("Overlay","woocommerce"),initialOpen:!0,settings:[{colorValue:b,gradientValue:m,onColorChange:e=>g({overlayColor:e}),onGradientChange:e=>{p(e),g({overlayGradient:e})},label:Object(c.__)("Color","woocommerce")}]},Object(r.createElement)(a.RangeControl,{label:Object(c.__)("Opacity","woocommerce"),value:i,onChange:e=>g({dimRatio:e}),min:0,max:100,step:10,required:!0}))))},u=e=>t=>{const{attributes:n,name:u,setAttributes:d}=t,{alt:b,dimRatio:m,focalPoint:g,hasParallax:p,isRepeated:h,imageFit:O,mediaId:j,mediaSrc:f,overlayColor:v,overlayGradient:w,showDesc:_,showPrice:y}=n,E=u===l.a.featuredProduct?t.product:t.category,{setGradient:k}=Object(o.__experimentalUseGradient)({gradientAttribute:"overlayGradient",customGradientAttribute:"overlayGradient"}),{backgroundImageSrc:S}=Object(i.a)({item:E,mediaId:j,mediaSrc:f,blockName:u}),I=u===l.a.featuredProduct?Object(r.createElement)(a.ToggleControl,{label:Object(c.__)("Show price","woocommerce"),checked:y,onChange:()=>d({showPrice:!y})}):void 0;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s,{alt:b,backgroundImageSrc:S,contentPanel:I,dimRatio:m,focalPoint:g,hasParallax:p,isRepeated:h,imageFit:O,overlayColor:v,overlayGradient:w,setAttributes:d,setGradient:k,showDesc:_}),Object(r.createElement)(e,{...t}))}},25:function(e,t){e.exports=window.wp.isShallowEqual},250:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),c=n(1),o=n(5),a=n(2),i=n(393),l=n(99);const s=({backgroundImageId:e,backgroundImageSrc:t,contentAlign:n,cropLabel:l,editLabel:s,editMode:u,isEditingImage:d,mediaSrc:b,setAttributes:m,setIsEditingImage:g})=>Object(r.createElement)(o.BlockControls,null,Object(r.createElement)(o.AlignmentToolbar,{value:n,onChange:e=>{m({contentAlign:e})}}),Object(r.createElement)(a.ToolbarGroup,null,t&&!d&&Object(r.createElement)(a.ToolbarButton,{onClick:()=>g(!0),icon:i.a,label:l}),Object(r.createElement)(o.MediaReplaceFlow,{mediaId:e,mediaURL:b,accept:"image/*",onSelect:e=>{m({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"]}),e&&b?Object(r.createElement)(a.ToolbarButton,{onClick:()=>m({mediaId:0,mediaSrc:""})},Object(c.__)("Reset","woocommerce")):null),Object(r.createElement)(a.ToolbarGroup,{controls:[{icon:"edit",title:s,onClick:()=>m({editMode:!u}),isActive:u}]})),u=({cropLabel:e,editLabel:t})=>n=>c=>{const[o,a]=c.useEditingImage,{attributes:i,category:u,name:d,product:b,setAttributes:m}=c,{contentAlign:g,editMode:p,mediaId:h,mediaSrc:O}=i,j=u||b,{backgroundImageId:f,backgroundImageSrc:v}=Object(l.a)({item:j,mediaId:h,mediaSrc:O,blockName:d});return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s,{backgroundImageId:f,backgroundImageSrc:v,contentAlign:g,cropLabel:e,editLabel:t,editMode:p,isEditingImage:o,mediaSrc:O,setAttributes:m,setIsEditingImage:a}),Object(r.createElement)(n,{...c}))}},253:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),c=n(260),o=n(2),a=n(4),i=n.n(a),l=n(86),s=n(5),u=n(1);const d=({itemId:e,linkText:t,permalink:n})=>{const c=i()("wp-block-button__link","is-style-fill");return"preview"===e?Object(r.createElement)("div",{className:"wp-block-button aligncenter",style:{width:"100%"}},Object(r.createElement)(s.RichText.Content,{tagName:"a",className:c,href:n,title:t,style:{backgroundColor:"vivid-green-cyan",borderRadius:"5px"},value:t,target:n})):Object(r.createElement)(s.InnerBlocks,{template:[["core/buttons",{layout:{type:"flex",justifyContent:"center"}},[["core/button",{text:Object(u.__)("Shop now","woocommerce"),url:n}]]]],templateLock:"all"})};var b=n(41);const m=({className:e="",onResize:t,...n})=>{const[c,a]=Object(r.useState)(!1),l=i()(e,{"is-resizing":c}),s=Object(b.c)(((e,n,r,o)=>{c||a(!0),null==t||t(e,n,r,o)}),50,{leading:!0});return Object(r.createElement)(o.ResizableBox,{className:l,enable:{bottom:!0},onResize:s,onResizeStop:(...e)=>{null==t||t(...e),a(!1)},...n})};var g=n(99),p=n(100);const h=({emptyMessage:e,icon:t,label:n,noSelectionButtonLabel:a})=>s=>u=>{const[b]=u.useEditingImage,{attributes:h,category:O,isLoading:j,isSelected:f,name:v,product:w,setAttributes:_}=u,{mediaId:y,mediaSrc:E}=h,k=O||w,[S,I]=Object(r.useState)({}),{backgroundImageSrc:C}=Object(g.a)({item:k,mediaId:y,mediaSrc:E,blockName:v}),x=Object(p.c)(v),P=Object(r.useCallback)(((e,t,n)=>{_({minHeight:parseInt(n.style.height,10)})}),[_]),N=Object(l.a)(h);return b?Object(r.createElement)(s,{...u,backgroundImageSize:S}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s,{...u,backgroundImageSize:S}),k?(()=>{var e,t;const{contentAlign:n,dimRatio:o,focalPoint:a,hasParallax:l,isRepeated:s,imageFit:u,minHeight:b,overlayColor:g,overlayGradient:v,showDesc:_,showPrice:y,style:E,textColor:S}=h,R=i()(x,{"is-selected":f&&"preview"!==h.categoryId&&"preview"!==h.productId,"is-loading":!k&&j,"is-not-found":!k&&!j,"has-background-dim":0!==o,"is-repeated":s},Object(p.a)(o),"center"!==n&&`has-${n}-content`,N.className),A={borderRadius:null==E||null===(e=E.border)||void 0===e?void 0:e.radius,color:S?`var(--wp--preset--color--${S})`:null==E||null===(t=E.color)||void 0===t?void 0:t.text,boxSizing:"border-box",minHeight:b,...N.style},L=!s&&!l,$=Object(p.b)({focalPoint:a,imageFit:u,isImgElement:L,isRepeated:s,url:C}),T={background:v,backgroundColor:g};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(m,{enable:{bottom:!0},onResize:P,showHandle:f,style:{minHeight:b}}),Object(r.createElement)("div",{className:R,style:A},Object(r.createElement)("div",{className:`${x}__wrapper`},Object(r.createElement)("div",{className:"background-dim__overlay",style:T}),C&&(L?Object(r.createElement)("img",{alt:k.name,className:`${x}__background-image`,src:C,style:$,onLoad:e=>{var t,n;I({height:null===(t=e.currentTarget)||void 0===t?void 0:t.naturalHeight,width:null===(n=e.currentTarget)||void 0===n?void 0:n.naturalWidth})}}):Object(r.createElement)("div",{className:i()(`${x}__background-image`,{"has-parallax":l}),style:$})),Object(r.createElement)("h2",{className:`${x}__title`,dangerouslySetInnerHTML:{__html:k.name}}),!Object(c.a)(null==w?void 0:w.variation)&&Object(r.createElement)("h3",{className:`${x}__variation`,dangerouslySetInnerHTML:{__html:w.variation}}),_&&Object(r.createElement)("div",{className:`${x}__description`,dangerouslySetInnerHTML:{__html:(null==O?void 0:O.description)||(null==w?void 0:w.short_description)}}),y&&Object(r.createElement)("div",{className:`${x}__price`,dangerouslySetInnerHTML:{__html:w.price_html}}),Object(r.createElement)("div",{className:`${x}__link`},(()=>{const{categoryId:e,linkText:t,productId:n}=h;return Object(r.createElement)(d,{itemId:e||n,linkText:t,permalink:(O||w).permalink})})()))))})():Object(r.createElement)(o.Placeholder,{className:x,icon:Object(r.createElement)(o.Icon,{icon:t}),label:n},j?Object(r.createElement)(o.Spinner,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,e),Object(r.createElement)("div",{style:{flexBasis:"100%",height:"0"}}),Object(r.createElement)("button",{type:"button",className:"components-button is-secondary",onClick:()=>_({editMode:!0})},a))))}},254:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),c=n(5),o=n(7),a=n(3),i=n(83);function l(e){return function(t){const n=Object(c.useBlockProps)(),{color:o,...a}=n.style;return Object(r.createElement)("div",{...n,style:a},Object(r.createElement)(e,{...t}))}}function s(e,t,n,s){var u,d,b,m,g,p,h,O,j,f,v;const w={attributes:{...n.attributes,minHeight:{type:"number",default:Object(a.getSetting)("defaultHeight",500)}},supports:{...n.supports,color:{background:null===(u=n.supports)||void 0===u||null===(d=u.color)||void 0===d?void 0:d.background,text:null===(b=n.supports)||void 0===b||null===(m=b.color)||void 0===m?void 0:m.text},spacing:{padding:null===(g=n.supports)||void 0===g||null===(p=g.spacing)||void 0===p?void 0:p.padding,...Object(i.b)()&&{__experimentalDefaultControls:{padding:null===(h=n.supports)||void 0===h||null===(O=h.spacing)||void 0===O?void 0:O.__experimentalDefaultControls},__experimentalSkipSerialization:null===(j=n.supports)||void 0===j||null===(f=j.spacing)||void 0===f?void 0:f.__experimentalSkipSerialization}},...Object(i.b)()&&{__experimentalBorder:null==n||null===(v=n.supports)||void 0===v?void 0:v.__experimentalBorder}}},_={attributes:{alt:"",contentAlign:"center",dimRatio:50,editMode:!1,hasParallax:!1,isRepeated:!1,height:Object(a.getSetting)("defaultHeight",500),mediaSrc:"",overlayColor:"#000000",showDesc:!0}};Object(o.registerBlockType)(n,{...w,example:{..._,...t},edit:l(e),save:()=>Object(r.createElement)(c.InnerBlocks.Content,null),...s})}},26:function(e,t){e.exports=window.React},260:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length},28:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}}},3:function(e,t){e.exports=window.wc.wcSettings},31:function(e,t){e.exports=window.wp.escapeHtml},34:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(31);t.a=({error:e})=>Object(r.createElement)("div",{className:"wc-block-error-message"},(({message:e,type:t})=>e?"general"===t?Object(r.createElement)("span",null,Object(c.__)("The following error was returned","woocommerce"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(e))):"api"===t?Object(r.createElement)("span",null,Object(c.__)("The following error was returned from the API","woocommerce"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(e))):e:Object(c.__)("An error has prevented the block from being updated.","woocommerce"))(e))},35:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(0),c=n(4),o=n.n(c),a=n(2);function i(e,t,n){const r=new Set(t.map((e=>e[n])));return e.filter((e=>!r.has(e[n])))}var l=n(10),s=n(16);const u=({label:e})=>Object(r.createElement)("span",{className:"woocommerce-search-list__item-count"},e),d=e=>{const{item:t,search:n}=e,c=t.breadcrumbs&&t.breadcrumbs.length;return Object(r.createElement)("span",{className:"woocommerce-search-list__item-label"},c?Object(r.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(s.b)(t.breadcrumbs)):null,Object(r.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(s.d)(Object(l.decodeEntities)(t.name),n)))},b=({countLabel:e,className:t,depth:n=0,controlId:c="",item:b,isSelected:m,isSingle:g,onSelect:p,search:h="",selected:O,useExpandedPanelId:j,...f})=>{var v,w;const[_,y]=j,E=null!=e&&void 0!==b.count&&null!==b.count,k=!(null===(v=b.breadcrumbs)||void 0===v||!v.length),S=!(null===(w=b.children)||void 0===w||!w.length),I=_===b.id,C=o()(["woocommerce-search-list__item",`depth-${n}`,t],{"has-breadcrumbs":k,"has-children":S,"has-count":E,"is-expanded":I,"is-radio-button":g}),x=f.name||`search-list-item-${c}`,P=`${x}-${b.id}`,N=Object(r.useCallback)((()=>{y(I?-1:Number(b.id))}),[I,b.id,y]);return S?Object(r.createElement)("div",{className:C,onClick:N,onKeyDown:e=>"Enter"===e.key||" "===e.key?N():null,role:"treeitem",tabIndex:0},g?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("input",{type:"radio",id:P,name:x,value:b.value,onChange:p(b),onClick:e=>e.stopPropagation(),checked:m,className:"woocommerce-search-list__item-input",...f}),Object(r.createElement)(d,{item:b,search:h}),E?Object(r.createElement)(u,{label:e||b.count}):null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.CheckboxControl,{className:"woocommerce-search-list__item-input",checked:m,...!m&&b.children.some((e=>O.find((t=>t.id===e.id))))?{indeterminate:!0}:{},label:Object(s.d)(Object(l.decodeEntities)(b.name),h),onChange:()=>{m?p(i(O,b.children,"id"))():p(function(e,t,n){const r=i(t,e,"id");return[...e,...r]}(O,b.children))()},onClick:e=>e.stopPropagation()}),E?Object(r.createElement)(u,{label:e||b.count}):null)):Object(r.createElement)("label",{htmlFor:P,className:C},g?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("input",{type:"radio",id:P,name:x,value:b.value,onChange:p(b),checked:m,className:"woocommerce-search-list__item-input",...f}),Object(r.createElement)(d,{item:b,search:h})):Object(r.createElement)(a.CheckboxControl,{id:P,name:x,className:"woocommerce-search-list__item-input",value:Object(l.decodeEntities)(b.value),label:Object(s.d)(Object(l.decodeEntities)(b.name),h),onChange:p(b),checked:m,...f}),E?Object(r.createElement)(u,{label:e||b.count}):null)};t.b=b},388:function(e){e.exports=JSON.parse('{"name":"woocommerce/featured-category","version":"1.0.0","title":"Featured Category","category":"woocommerce","keywords":["WooCommerce"],"description":"Visually highlight a product category and encourage prompt action.","supports":{"align":["wide","full"],"html":false,"color":{"background":true,"text":true},"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true}},"attributes":{"alt":{"type":"string","default":""},"contentAlign":{"type":"string","default":"center"},"dimRatio":{"type":"number","default":50},"editMode":{"type":"boolean","default":true},"focalPoint":{"type":"object","default":{"x":0.5,"y":0.5}},"imageFit":{"type":"string","default":"none"},"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"mediaId":{"type":"number","default":0},"mediaSrc":{"type":"string","default":""},"minHeight":{"type":"number","default":500},"linkText":{"default":"Shop now","type":"string"},"categoryId":{"type":"number"},"overlayColor":{"type":"string","default":"#000000"},"overlayGradient":{"type":"string"},"previewCategory":{"type":"object","default":null},"showDesc":{"type":"boolean","default":true}},"textdomain":"woocommerce","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}')},42:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>null===e},49:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return c}));const r={height:500,width:500},c={featuredCategory:"woocommerce/featured-category",featuredProduct:"woocommerce/featured-product"}},496:function(e,t,n){e.exports=n(573)},497:function(e,t){},498:function(e,t){},5:function(e,t){e.exports=window.wp.blockEditor},54:function(e,t){},55:function(e,t){},57:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=(e,t)=>e.reduce(((e,n)=>(e[String(t?n[t]:n)]=n,e)),{})},573:function(e,t,n){"use strict";n.r(t);var r=n(0),c=n(9),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-6.92-3.96L12.39 17 15 15.47 17.61 17l-.69-2.96 2.3-1.99-3.03-.26L15 9l-1.19 2.79-3.03.26z"})),a=n(70),i=(n(497),n(498),n(11)),l=n(23),s=n(28);const u=Object(i.createHigherOrderComponent)((e=>class extends r.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,category:"preview"===this.props.attributes.categoryId?this.props.attributes.previewCategory:null},this.loadCategory=this.loadCategory.bind(this)}componentDidMount(){this.loadCategory()}componentDidUpdate(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}loadCategory(){const{categoryId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),Object(l.d)(e).then((e=>{this.setState({category:e,loading:!1,error:null})})).catch((async e=>{const t=await Object(s.a)(e);this.setState({category:null,loading:!1,error:t})}))):this.setState({category:null,loading:!1,error:null}))}render(){const{error:t,loading:n,category:c}=this.state;return Object(r.createElement)(e,{...this.props,error:t,getCategory:this.loadCategory,isLoading:n,category:c})}}),"withCategory");var d=u,b=n(2),m=n(1),g=n(250),p=n(248),h=n(249),O=n(247),j=n(246),f=n(245),v=n(253),w=n(244);const _={icon:o,label:Object(m.__)("Featured Category","woocommerce")},y={..._,cropLabel:Object(m.__)("Edit category image","woocommerce"),editLabel:Object(m.__)("Edit selected category","woocommerce")},E={..._,emptyMessage:Object(m.__)("No product category is selected.","woocommerce"),noSelectionButtonLabel:Object(m.__)("Select a category","woocommerce")},k={..._,description:Object(m.__)("Visually highlight a product category and encourage prompt action.","woocommerce"),editLabel:Object(m.__)("Showing Featured Product block preview.","woocommerce")};var S=Object(i.compose)([d,b.withSpokenMessages,w.a,f.a,Object(j.a)(k),Object(v.a)(E),O.a,p.a,h.a,Object(g.a)(y)])((()=>Object(r.createElement)(r.Fragment,null))),I=n(388),C=n(254),x=n(17);const P={attributes:{categoryId:"preview",previewCategory:{id:1,name:Object(m.__)("Clothing","woocommerce"),slug:"clothing",parent:0,count:10,description:`<p>${Object(m.__)("Branded t-shirts, jumpers, pants and more!","woocommerce")}</p>\n`,image:{id:1,date_created:"2019-07-15T17:05:04",date_created_gmt:"2019-07-15T17:05:04",date_modified:"2019-07-15T17:05:04",date_modified_gmt:"2019-07-15T17:05:04",src:x.n+"previews/collection.jpg",name:"",alt:""},permalink:"#"},editMode:!1}};Object(C.a)(S,P,I,{icon:{src:Object(r.createElement)(a.a,{icon:o,className:"wc-block-editor-components-block-icon"})}})},6:function(e,t){e.exports=window.wp.data},65:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(35),a=n(102),i=n(2),l=n(11),s=n(23),u=n(28);const d=Object(l.createHigherOrderComponent)((e=>class extends r.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(s.c)().then((e=>{this.setState({categories:e,loading:!1,error:null})})).catch((async e=>{const t=await Object(u.a)(e);this.setState({categories:[],loading:!1,error:t})}))}render(){const{error:t,loading:n,categories:c}=this.state;return Object(r.createElement)(e,{...this.props,error:t,isLoading:n,categories:c})}}),"withCategories");var b=d,m=n(34),g=n(4),p=n.n(g);n(106);const h=({categories:e,error:t,isLoading:n,onChange:l,onOperatorChange:s,operator:u,selected:d,isCompact:b,isSingle:g,showReviewCount:h})=>{const O={clear:Object(c.__)("Clear all product categories","woocommerce"),list:Object(c.__)("Product Categories","woocommerce"),noItems:Object(c.__)("Your store doesn't have any product categories.","woocommerce"),search:Object(c.__)("Search for product categories","woocommerce"),selected:e=>Object(c.sprintf)(/* translators: %d is the count of selected categories. */
Object(c._n)("%d category selected","%d categories selected",e,"woocommerce"),e),updated:Object(c.__)("Category search results updated.","woocommerce")};return t?Object(r.createElement)(m.a,{error:t}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.a,{className:"woocommerce-product-categories",list:e,isLoading:n,selected:d.map((t=>e.find((e=>e.id===t)))).filter(Boolean),onChange:l,renderItem:e=>{const{item:t,search:n,depth:a=0}=e,i=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,l=h?Object(c.sprintf)(/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */
Object(c._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woocommerce"),i,t.review_count):Object(c.sprintf)(/* translators: %1$s is the item name, %2$d is the count of products for the item. */
Object(c._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woocommerce"),i,t.count),s=h?Object(c.sprintf)(/* translators: %d is the count of reviews. */
Object(c._n)("%d review","%d reviews",t.review_count,"woocommerce"),t.review_count):Object(c.sprintf)(/* translators: %d is the count of products. */
Object(c._n)("%d product","%d products",t.count,"woocommerce"),t.count);return Object(r.createElement)(o.a,{className:p()("woocommerce-product-categories__item","has-count",{"is-searching":n.length>0,"is-skip-level":0===a&&0!==t.parent}),...e,countLabel:s,"aria-label":l})},messages:O,isCompact:b,isHierarchical:!0,isSingle:g}),!!s&&Object(r.createElement)("div",{hidden:d.length<2},Object(r.createElement)(i.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(c.__)("Display products matching","woocommerce"),help:Object(c.__)("Pick at least two categories to use this setting.","woocommerce"),value:u,onChange:s,options:[{label:Object(c.__)("Any selected categories","woocommerce"),value:"any"},{label:Object(c.__)("All selected categories","woocommerce"),value:"all"}]})))};h.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=b(h)},7:function(e,t){e.exports=window.wp.blocks},73:function(e,t,n){"use strict";var r=n(0),c=n(2),o=n(35),a=n(4),i=n.n(a);t.a=({className:e,item:t,isSelected:n,isLoading:a,onSelect:l,disabled:s,...u})=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.a,{...u,key:t.id,className:e,isSelected:n,item:t,onSelect:l,disabled:s}),n&&a&&Object(r.createElement)("div",{key:"loading",className:i()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(r.createElement)(c.Spinner,null)))},83:function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}));var r=n(7),c=n(17);const o=(e,t)=>{if(c.o>2)return Object(r.registerBlockType)(e,t)},a=()=>c.o>2,i=()=>c.o>1},84:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>"number"==typeof e},86:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(4),c=n.n(r),o=n(21),a=n(113),i=n(654),l=n(127);function s(e={}){const t={};return Object(l.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function u(e,t){return e&&t?`has-${Object(i.a)(t)}-${e}`:""}const d=e=>{const t=(e=>{const t=Object(o.b)(e)?e:{style:{}};let n=t.style;return Object(a.a)(n)&&(n=JSON.parse(n)||{}),Object(o.b)(n)||(n={}),{...t,style:n}})(e),n=function(e){var t,n,r,a,i,l,d;const{backgroundColor:b,textColor:m,gradient:g,style:p}=e,h=u("background-color",b),O=u("color",m),j=function(e){if(e)return`has-${e}-gradient-background`}(g),f=j||(null==p||null===(t=p.color)||void 0===t?void 0:t.gradient);return{className:c()(O,j,{[h]:!f&&!!h,"has-text-color":m||(null==p||null===(n=p.color)||void 0===n?void 0:n.text),"has-background":b||(null==p||null===(r=p.color)||void 0===r?void 0:r.background)||g||(null==p||null===(a=p.color)||void 0===a?void 0:a.gradient),"has-link-color":Object(o.b)(null==p||null===(i=p.elements)||void 0===i?void 0:i.link)?null==p||null===(l=p.elements)||void 0===l||null===(d=l.link)||void 0===d?void 0:d.color:void 0}),style:s({color:(null==p?void 0:p.color)||{}})}}(t),r=function(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:function(e){var t;const{borderColor:n,style:r}=e,o=n?u("border-color",n):"";return c()({"has-border-color":!!n||!(null==r||null===(t=r.border)||void 0===t||!t.color),[o]:!!o})}(e),style:s({border:n})}}(t),i=function(e){var t;return{className:void 0,style:s({spacing:(null===(t=e.style)||void 0===t?void 0:t.spacing)||{}})}}(t),l=(e=>{const t=Object(o.b)(e.style.typography)?e.style.typography:{},n=Object(a.a)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:n,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:c()(l.className,n.className,r.className,i.className),style:{...l.style,...n.style,...r.style,...i.style}}}},88:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(70),a=n(212),i=n(4),l=n.n(i),s=n(2),u=n(34);n(131),t.a=({className:e,error:t,isLoading:n=!1,onRetry:i})=>Object(r.createElement)(s.Placeholder,{icon:Object(r.createElement)(o.a,{icon:a.a}),label:Object(c.__)("Sorry, an error occurred","woocommerce"),className:l()("wc-block-api-error",e)},Object(r.createElement)(u.a,{error:t}),i&&Object(r.createElement)(r.Fragment,null,n?Object(r.createElement)(s.Spinner,null):Object(r.createElement)(s.Button,{isSecondary:!0,onClick:i},Object(c.__)("Retry","woocommerce"))))},9:function(e,t){e.exports=window.wp.primitives},99:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=n(49),o=n(84);function a(e){return!!e&&Object(o.a)(e.id)&&"string"==typeof e.src}function i({blockName:e,item:t,mediaId:n,mediaSrc:o}){const[i,l]=Object(r.useState)(0),[s,u]=Object(r.useState)("");return Object(r.useEffect)((()=>{var r,o;l(n||(e===c.a.featuredProduct?(o=t)&&o.images&&o.images.length&&o.images[0].id||0:(r=t)&&a(r.image)?r.image.id:0))}),[e,t,n]),Object(r.useEffect)((()=>{var n,r;u(o||(e===c.a.featuredProduct?(r=t)&&r.images&&r.images.length&&r.images[0].src||"":(n=t)&&a(n.image)?n.image.src:""))}),[e,t,o]),{backgroundImageId:i,backgroundImageSrc:s}}}});